 <#include "../header.ftl">
<link href="${TEMPLATE_PATH}/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user_reg.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user_bind.css" rel="stylesheet" type="text/css" />
<script>
function showErrors(id,errors){
	for(var name in errors){
		$.fn.tips({type:"error",content:errors[name]});
		var ele=$("input[name='"+name+"']");
		id.validator('showMsg', ele, {
		    type: "error",
		    msg: errors[name]
		});
	}
}
$(function(){
	$(".form_getpass").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		beforeSubmit:function(){$("input[type='submit']").attr("disabled",true);},
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"/user/getPass.json",
				type:"post",
				dataType:"json",
				data:$(form).serialize(),
				success:function(data){
					var type="warn";
					if(data.result==true){type="ok";}
					if(data.result==true)
					{
						$.fn.tips({type:type,content:data.msg});
					}else{
						showErrors($('.form_getpass'),data.errors);
					}
					$(".form_getpass")[0].reset();$("input[type='submit']").attr("disabled",false);
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					$.fn.tips({type:"error",content:XMLHttpRequest.responseText});
					$(".form_getpass")[0].reset();$("input[type='submit']").attr("disabled",false);
				}
			});
		},
		invalid:function(){$("input[type='submit']").attr("disabled",false);}
	});
})
</script>
 <div id="position">您所在的位置：<a href="/">首页</a> > <a href="/user/">会员中心</a></div>
    <div class="w980 mt10 mc">
        <div class="w900 bt">
            <ul class="bind_menu">
                <li class="hover">忘记密码</li>
            </ul>
            <div class="c">
                <div class="p10"></div>
               <form class="form_getpass" method="post">
               <ul id="reg">
                   <li><em>电子邮箱：</em><input type="text" name="emailpass" class="ip w01" maxlength="20" data-rule="电子邮箱:required;email;" /></li>
                   <li><em>验证码：</em><input type="text" name="imgcode" class="ip w02" maxlength="6" data-rule="验证码:required;" /> <img src="${basePath}/admin/captcha.htm?t=1" title="看不清楚？点击刷新！" align="absmiddle" id="imgcode" onClick="this.src+='&'+Math.random();" /><span for="imgcode" class="msg-box"></span></li>
                   <dd><input type="submit" value="找回密码" class="bnt_blue" /></dd>
               </ul>
               </form>
            </div>
        </div>
    </div>
  </div>
<#include "../footer.ftl">